<%@taglib prefix="s" uri="/struts-tags"%>
<%@page pageEncoding="UTF-8"%>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
		<link rel="stylesheet" type="text/css" href="<s:url value='/css/topic.css'/>"/>
		<link rel="stylesheet" type="text/css" href="<s:url value='/css/font.css'/>"/>
		<script language="javascript">
			function saveTopic() {
				c = window.confirm("<s:text name='system.bbs.alert.confirm'/>");
				if (c) {
				    document.getElementsByName("topic.parentId")[0].value="<s:property value='parentId'/>";
					topicForm.action = "<s:url value='/bbs/saveTopicAction.action' includeParams='none'/>";
                    topicForm.submit();
				}			    
			}
			
			function testPage() {
			    topicForm.action="<s:url value='/bbs/testPageAction.action' includeParams='none'/>";
			    topicForm.submit();
			}
		</script>
	</head>
	<body style="overflow-x:hidden">
		<div id="mainDiv" class="style2">
			<s:form id="topicForm" method="post" theme="simple">
			    <s:hidden name="topic.parentId"/>
				  <ul id="label">
				  	<li><s:text name="system.bbs.title.newTopicTitle"/><s:textfield name="topic.topicTitle" size="70"/></li>
				  	<li><s:text name="system.bbs.title.newTopicType"/><s:radio name="topic.topicType" list="#{'1':'普通','2':'原创','3':'转载'}" listKey="key" listValue="value"/></li>
				  	<li><s:text name="system.bbs.title.newTopicContent"/><s:textarea name="topic.topicContent" cols="70" rows="30"/></li>
				  	<li style="text-align:center"><img src="<s:url value='/images/ch/confirm.gif'/>" onclick="saveTopic()"/><img src="<s:url value='/images/ch/return.gif'/>" onclick="testPage()"/></li>	
				  </ul>
			</s:form>
	  </div>
	</body>
</html>